home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CoolWB / Icons / Other / RareDiamonds / install_RareDiamonds < prev    next >
Text File  |  1995-03-30  |  21KB  |  679 lines

  1. ; Nov/Dez 94/Jan 95/Feb 95/Mar 95
  2. ; RareDiamonds Installer-Script
  3.  
  4. ; 15.01'95    - Installiert den ausgewählten DrawerTyp auch als def_drawer.
  5. ;        - Der Iconpart läßt sich 'skippen'.
  6. ;        - Guide wird mitinstalliert.
  7. ; 18.01'95    - Legt Backup mit CopyIcons an.
  8. ;               - Tauscht drawer.infos mit ChangeDrawerImages.
  9. ;        - Tauscht drawer.infos auf beliebigen Partitionen.
  10. ;        - an einigen Stellen noch confirms eingefügt.
  11. ; 21.01'95    - neues CopyIcons -> CopyIcon.
  12. ; 11.02'95    - Disk.info Installation.
  13. ; 06.03'95    - Disk.info Installation etwas vereinfacht.. :)
  14. ; 23.03'95    - nur noch eine Iconvariante.
  15. ;
  16. ;-----------------------------------------------------------------------------
  17. ;
  18.  
  19. (set @default-dest "")                ;there is no final place...
  20.  
  21.     ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  22.     ;!!change this before release!!
  23.     ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  24.  
  25. (makeassign "sos" "sys:" (safe))        ;set sos: for dos-scripts
  26.  
  27.  
  28. ;-----------------------------------------------------------------------------
  29. ; backup known .info - files on SYS:
  30.  
  31.  
  32. (procedure  backupIcons
  33.  
  34.     (set backupIcons_path "ram:")
  35.  
  36.     (if
  37.  
  38.         (askbool
  39.             (prompt "\n\n Backup Icons of your SYS: partition?")
  40.             (help   (cat "If you want to preserve your current icon-set, "
  41.                          "then go on with 'YES'.\n I will backup then every "
  42.                          "icon on your SYS: partition."))
  43.         );end askbool
  44.  
  45.     (;then
  46.  
  47.         (set backupIcons_path
  48.             (askdir
  49.                 (prompt "Select destination path for 'sys_Backup' drawer.")
  50.                 (help    @askdir-help)
  51.                 (default backupIcons_path)
  52.             );end askdir
  53.         );end set
  54.  
  55.         (set backupIcons_path (tackon backupIcons_path "sys_Backup"))
  56.  
  57.         (execute ("install_scripts/backup_icons %s%s%s" '"' backupIcons_path '"')
  58.  
  59.             (prompt "\n\nMaking .info-backup of your sys: partition. "
  60.                     "to\n\n" backupIcons_path "\n\n You may restore your"
  61.                     " original iconset by typing : \n\n"
  62.                     "copy " backupIcons_path " sys: all \n\n"
  63.                     "in a cli window.")
  64.             (help   "I hope you will never need the backup.. ;-)")
  65.             (confirm)
  66.  
  67.         );end execute
  68.  
  69.     );end then
  70.  
  71.     );end if
  72.  
  73. );end procedure
  74.  
  75.  
  76.  
  77. ;-----------------------------------------------------------------------------
  78. ; install icons
  79.  
  80.  
  81. (procedure installIcons
  82.  
  83. (if (askbool
  84.         (prompt "\n\nInstall IconSet?")
  85.             (help   "Install Iconset or not?"))
  86.  
  87.         (;then
  88.  
  89.             (complete 0)
  90.  
  91.             (set drawer
  92.                 (askchoice
  93.                     (prompt  "Select drawer icon for installation."
  94.                              "\n See 'IconArchive/drawers' for previews.")
  95.                     (choices "drawer1" "drawer2" "drawer3" "drawer4")
  96.                     (default 3)
  97.                     (help    "Select the one you like most..   my favorit is drawer4.")
  98.                  )
  99.              )
  100.  
  101.             (set drawer (+ drawer 1))
  102.  
  103.             (execute ("install_scripts/sys_drawer %ld" drawer)
  104.                (prompt "\n\n replace all drawer .info images on sys: ?")
  105.                (help   "This part (recursivly) scans only subdirectories which have its own .info file.")
  106.                (confirm)
  107.             )
  108.  
  109.             (complete 15)
  110.  
  111.             (if (askbool
  112.                    (prompt "\n\n Replace icon images in prefs, system, tools, utilities, wbstartup, etc.?")
  113.                    (help (cat "This part replaces the icon images of the standard programs on sys: (in their "
  114.                               "original location) and a few others like ReqChange or ToolManager (if available "
  115.                               "in wbstartup or prefs)." ))
  116.                 )
  117.  
  118.                 (;then
  119.  
  120.             (execute "install_scripts/sys_DevsStorage")
  121.             (complete 30)
  122.             (execute "install_scripts/sys_disk")
  123.             (complete 35)
  124.             (execute "install_scripts/sys_system")
  125.             (complete 40)
  126.             (execute "install_scripts/sys_tools")
  127.             (complete 45)
  128.             (execute "install_scripts/sys_utilities")
  129.             (complete 50)
  130.             (execute ("install_scripts/sys_env-archive %ld" drawer))
  131.             (complete 55)
  132.  
  133.             (execute "install_scripts/mui")
  134.             (complete 60)
  135.             (execute "install_scripts/NickPrefs")
  136.             (complete 65)
  137.             (execute "install_scripts/ReqChange")
  138.             (complete 70)
  139.             (execute "install_scripts/sys_prefs")
  140.             (complete 75)
  141.             (execute "install_scripts/sys_ToolsCommodities")
  142.             (complete 80)
  143.             (execute "install_scripts/ToolManager")
  144.             (complete 85)
  145.             (execute "install_scripts/wbstartup")
  146.             (complete 90)
  147.  
  148.             );neht
  149.             );fi
  150.  
  151.             (if (askbool
  152.                     (prompt "\n\nInstall available 'ImageDrawers'?\n"
  153.                             "Preview in IconArchive/Sys/ImageDrawers")
  154.                     (help   "Install them or not?")
  155.                 )
  156.  
  157.                 (
  158.                     (execute "install_scripts/sys_imagedrawers")
  159.                 )
  160.             )
  161.  
  162.            (complete 100)
  163.  
  164.         )
  165.  
  166.     )
  167.  
  168. )
  169.  
  170.  
  171. ;-----------------------------------------------------------------------------
  172. ; install drawers
  173.  
  174.  
  175. (procedure installDrawers
  176.  
  177. (set drawer_path "ram:")
  178. (set backup_path "ram:")
  179. (set goon 1)
  180.  
  181. (if (askbool
  182.         (prompt "\n\nInstall drawer.info files on any other partition?\n\n")
  183.             (help   ""))
  184.  
  185.         (;then
  186.  
  187.             (while (= goon 1)
  188.                 (;do
  189.  
  190.                      (set drawer
  191.                          (askchoice
  192.                             (prompt  "Select drawer icon for installation."
  193.                                      "\n See 'IconArchive/Drawers' for previews.")
  194.                             (choices "drawer1" "drawer2" "drawer3" "drawer4")
  195.                             (default 3)
  196.                             (help    "Select the one you like most..   my favorit is drawer4.")
  197.                          )
  198.                       )
  199.                       (set drawer (+ drawer 1))
  200.  
  201.                      (set drawer_path
  202.                           (askdir
  203.                               (prompt "Select path for replacing drawer .info images.")
  204.                               (help    "This part (recursivly) scans only subdirectories which have its own .info file.")
  205.                               (default drawer_path)
  206.                               (disk)
  207.                            );end askdir
  208.                       );end set
  209.  
  210.                       (if (askbool
  211.                              (prompt "\n\nBackup drawer .info files?")
  212.                              (help   "You may restore them like the sys: backup."))
  213.                           (;then
  214.  
  215.                              (message "\n\nDo NOT select the SAME DEVICE for source and destination, when "
  216.                                      "the destination drawer has its own .info file. "
  217.                                      "The drawer .info files in the backup drawer would change too "
  218.                                      "and the backup would be useless. "
  219.                                      "When the destination drawer has NO .info file, you may use the "
  220.                                      "same device.")
  221.  
  222.                              (set backup_path
  223.                                  (askdir
  224.                                     (prompt " Create or select a drawer as destination for the backup.")
  225.                                     (help    @askdir-help)
  226.                                     (default backup_path)
  227.                                     (disk)
  228.                                   );end askdir
  229.                               );end set
  230.  
  231.                               (run ("c/CopyIcon %s%s%s %s%s%s d a" '"' drawer_path '"' '"' backup_path '"')
  232.                                  (prompt "\n\n Making drawer .info backup from\n\n"
  233.                                          drawer_path "\n\n to\n\n " backup_path)
  234.                                  (help   "last chance to skip the backup...")
  235.                                  (confirm)
  236.  
  237.                               );end run
  238.                           )
  239.                       )
  240.  
  241.                      (run ("c/ChangeDrawerImages IconArchive/Drawers/Drawer%ld %s%s%s" drawer '"' drawer_path '"')
  242.                          (prompt "\n\n Really change drawer .info's now...? ;) ")
  243.                          (help   "last chance to skip... ")
  244.                          (confirm))
  245.  
  246.                       (if (askbool
  247.                               (prompt "\n\nNext path?\n")
  248.                               (help   "yes or no?"))
  249.  
  250.                            (;then
  251.                                (set goon 1)
  252.                            )
  253.                            (;else
  254.                                (set goon 0)
  255.                            )
  256.  
  257.                        );end if
  258.  
  259.                 );end do
  260.  
  261.             );end while
  262.  
  263.         ); end then
  264.  
  265.     );end if
  266.  
  267. )
  268.  
  269.  
  270. ;-----------------------------------------------------------------------------
  271. ; install disk.info's
  272.  
  273.  
  274. (procedure installDisks
  275.  
  276. (set disk_path "ram:")
  277. (set goon 1)
  278. (set number 1)
  279.  
  280. (if (askbool
  281.         (prompt    "\n\nInstall a disk.info file to any other partition?\n\n")
  282.             (help  "yes or no?"))
  283.  
  284.         (;then
  285.  
  286.             (while (= goon 1)
  287.                 (;do
  288.  
  289.                      (set diskinfo
  290.                          (askchoice
  291.                             (prompt  "Select disk.info icon for installation."
  292.                                      "\n See 'IconArchive/Disks' for previews.")
  293.                             (choices "Sys" "Disk1" "Disk3" "HD" "Ram")
  294.                             (default 3)
  295.                             (help    "Select the one which fits best to the drive.")
  296.                          )
  297.                       )
  298.  
  299.                      (if (= diskinfo 0)
  300.                         (;then
  301.                            (set infoname "Sys")
  302.                         )
  303.                      )
  304.                      (if (= diskinfo 1)
  305.                         (;then
  306.                            (set infoname "Disk1")
  307.                         )
  308.                      )
  309.                      (if (= diskinfo 2)
  310.                         (;then
  311.                            (set infoname "Disk3")
  312.                         )
  313.                      )
  314.                      (if (= diskinfo 3)
  315.                         (;then
  316.                            (set infoname "HD")
  317.                         )
  318.                      )
  319.                      (if (= diskinfo 4)
  320.                         (;then
  321.                            (set infoname "Ram")
  322.                         )
  323.                      )
  324.  
  325.                      (set disk_path
  326.                           (askdir
  327.                               (prompt "Select Drive for installing disk.info file.")
  328.                               (help    @askdir-help)
  329.                               (default disk_path)
  330.                               (disk)
  331.                            );end askdir
  332.                       );end set
  333.  
  334.                       (set disk_name (getdevice disk_path))
  335.  
  336.                       (run ("c/Change1Icon IconArchive/Disks/%s %s:Disk" infoname disk_name)
  337.                          (prompt ("\n\n Install %s to %s:Disk.info?" infoname disk_name)
  338.                             (confirm)
  339.                             (help "last chance to skip..")
  340.                          )
  341.                       )
  342.  
  343.                       (if (askbool
  344.                               (prompt ("\n Is the device a non-permanent storage? \n\n(like ram: ; read help for more.)"))
  345.                               (help    "I will copy the Disk.info to envarc/sys/ and add a "
  346.                                        "line to your User-Startup, so the Disk.info will be copied "
  347.                                        "to the device on startup.")
  348.  
  349.                           )
  350.                           (;then
  351.  
  352.                               (if (askbool
  353.                                       (prompt ("\n Copy Disk.info to \n\n envarc:sys/def_%s.info\n\n" disk_name )
  354.                                               ("\n\n Yes? Then snapshot Icon NOW!"))
  355.                                       (help   "")
  356.                                   )
  357.                                   (;then
  358.                                        (run ("copy %s:Disk.info env:sys/def_%s.info" disk_name disk_name))
  359.  
  360.                                        (startup
  361.                                             ("RareDiamonds copy .info %ld" number)
  362.                                             (command ("copy envarc:sys/def_%s.info %s:Disk.info" disk_name disk_name))
  363.                                             (set number (+ number 1))
  364.                                             (prompt ("\nAdd\n\n copy env:sys/def_%s.info %s:Disk.info\n\n" disk_name disk_name)
  365.                                                     ("to UserStartup?"))
  366.                                             (help "")
  367.                                        )
  368.                                   );then
  369.                               );fi
  370.  
  371.                           );then
  372.                       );fi
  373.  
  374.  
  375.                       (if (askbool
  376.                               (prompt "\n\nNext path?\n")
  377.                               (help   "yes or no?"))
  378.  
  379.                            (;then
  380.                                (set goon 1)
  381.                            )
  382.                            (;else
  383.                                (set goon 0)
  384.                            )
  385.  
  386.                        );end if
  387.  
  388.                 );end do
  389.  
  390.             );end while
  391.  
  392.         ); end then
  393.  
  394.     );end if
  395.  
  396. )
  397.  
  398. ;-----------------------------------------------------------------------------
  399. ; install RareDiamonds/IconArchive.
  400.  
  401. (procedure installArchive
  402.  
  403.     (set Archive-help (cat "This part of the installation copies the RareDiamonds Icon "
  404.                            "Archive to a selectable destination, so you may easily access "
  405.                            "any icon-image for further icon actions with IconToolBox or "
  406.                            "any other Icon-Tool."))
  407.  
  408.     (set archive-dest  "ram:")
  409.     (set archive2-dest "ram:")
  410.  
  411.     (if (askbool
  412.             (prompt "\n\nInstall the RareDiamonds IconArchive?")
  413.             (help   Archive-help)
  414.         )
  415.  
  416.         (
  417.             (set archive-dest
  418.                 (askdir
  419.                     (prompt "Select destination path for 'RareDiamonds/IconArchive' Drawer(s).")
  420.                     (default archive-dest)
  421.                     (help   @askdir-help)
  422.                 )
  423.             )
  424.  
  425.                (message "\n\nInstalling RareDiamonds' IconArchive to\n\n "
  426.                         (tackon archive-dest "RareDiamonds/IconArchive"))
  427.  
  428.                (makedir (tackon archive-dest "RareDiamonds"))
  429.  
  430.                (copyfiles
  431.                    (source "install_Icons/RareDiamonds.info")
  432.                    (dest   archive-dest))
  433.  
  434.                (tooltype
  435.                    (dest (tackon archive-dest "RareDiamonds"))
  436.                    (noposition))
  437.  
  438.                (set archive2-dest
  439.                    (tackon archive-dest "RareDiamonds"))
  440.  
  441.                (copyfiles
  442.                    (source "IconArchive")
  443.                    (dest   (tackon archive2-dest "IconArchive"))
  444.                    (all)
  445.                    (infos))
  446.  
  447.                (copyfiles
  448.                    (source "install_Icons/IconArchive.info")
  449.                    (dest   archive2-dest))
  450.  
  451.                (tooltype
  452.                    (dest    (tackon archive2-dest "IconArchive"))
  453.                    (noposition))
  454.  
  455.                (copyfiles
  456.                    (prompt  "Select Files...")
  457.                    (source  "")
  458.                    (dest    archive2-dest)
  459.                    (choices "RareDiamondsE.guide" "RareDiamondsD.guide")
  460.                    (files)
  461.                    (infos)
  462.                    (confirm)
  463.                    (help    @copyfiles-help)
  464.                 )
  465.  
  466.                 (tooltype
  467.                     (dest (tackon archive2-dest "RareDiamondsE.guide"))
  468.                     (noposition)
  469.                 )
  470.  
  471.                 (tooltype
  472.                     (dest (tackon archive2-dest "RareDiamondsD.guide"))
  473.                     (noposition)
  474.                 )
  475.  
  476.  
  477.         );end
  478.  
  479.     );fi
  480.  
  481. )
  482.  
  483.  
  484.  
  485.  
  486. ;-----------------------------------------------------------------------------
  487. ; install IconToolBox.
  488.  
  489.  
  490. (procedure installToolbox
  491.  
  492.     (set toolbox-dest "ram:")
  493.  
  494.     (set IconToolBox-help (cat "IconToolBox is a small tool mainly for replacing "
  495.                                "icon-images with images from the IconArchive. See "
  496.                                "IconToolBox.guide for more information.\n\n"
  497.                                "IconToolBox is a MUI (MagicUserInterface) Application."))
  498.  
  499.     (if (askbool
  500.             (prompt "\n\nInstall IconToolBox (MUI)?")
  501.             (help   IconToolBox-help))
  502.  
  503.         (;then
  504.             (set toolbox-dest
  505.                 (askdir
  506.                     (prompt  "Select destination path for IconToolBox file(s).")
  507.                     (default archive2-dest)
  508.                     (help    @askdir-help)
  509.                 )
  510.             )
  511.  
  512.             (copyfiles
  513.                 (prompt  "Select Files...")
  514.                 (source  "IconToolBox/")
  515.                 (dest    toolbox-dest)
  516.                 (choices "IconToolBox" "IconToolBox_deutsch.guide" "IconToolBox_english.guide")
  517.                 (files)
  518.                 (infos)
  519.                 (confirm)
  520.                 (help     @copyfiles-help)
  521.             )
  522.  
  523.             (copyfiles
  524.                 (source  "IconToolBox/env/")
  525.                 (dest    "env:")
  526.                 (all)
  527.                 (prompt  "copy IconToolBox' mui env files to env: ?")
  528.                 (help    "")
  529.                 (confirm)
  530.             )
  531.  
  532.             (copyfiles
  533.                 (source  "IconToolBox/env/")
  534.                 (dest    "envarc:")
  535.                 (all)
  536.                 (prompt  "copy IconToolBox' mui env files to envarc: ?")
  537.                 (help    "")
  538.                 (confirm)
  539.             )
  540.  
  541.             (tooltype
  542.                 (dest (tackon toolbox-dest "IconToolBox"))
  543.                 (settooltype "archive" (tackon archive2-dest "IconArchive"))
  544.                 (noposition)
  545.             )
  546.  
  547.             (tooltype
  548.                 (dest (tackon toolbox-dest "IconToolBox_deutsch.guide"))
  549.                 (noposition)
  550.             )
  551.  
  552.             (tooltype
  553.                 (dest (tackon toolbox-dest "IconToolBox_english.guide"))
  554.                 (noposition)
  555.             )
  556.  
  557.     );end
  558.  
  559.    );fi
  560.  
  561. )
  562.  
  563.  
  564.  
  565. ;-----------------------------------------------------------------------------
  566. ; install BackgroundPatterns.
  567.  
  568.  
  569. (procedure installBackgrounds
  570.  
  571.     (set backpatterns-dest "ram:")
  572.  
  573.     (set BackPatterns-help "a few BackgroundPatterns....")
  574.  
  575.     (if (askbool
  576.            (prompt "\n\nInstall Background Patterns?")
  577.            (help   BackPatterns-help))
  578.  
  579.         (;then
  580.  
  581.             (set backpatterns-dest
  582.                 (askdir
  583.                     (prompt  "Select destination path for 'Backgrounds' drawer.")
  584.                     (help    @askdir-help)
  585.                     (default archive2-dest)
  586.                 )
  587.             )
  588.  
  589. ;            (message "\n\n Installing Backgrounds to\n\n"
  590. ;                     (tackon backpatterns-dest "Backgrounds"))
  591.  
  592.             (copyfiles
  593.                 (source "Backgrounds")
  594.                 (dest   (tackon backpatterns-dest "Backgrounds"))
  595.                 (all)
  596.                 (prompt "Installing Backgrounds to " (tackon backpatterns-dest "Backgrounds"))
  597.                 (help   "")
  598.                 (confirm)
  599.   
  600.             )
  601.  
  602.         );end
  603.  
  604.     );fi
  605.  
  606. )
  607.  
  608.  
  609.  
  610.  
  611. ;-----------------------------------------------------------------------------
  612. ; install some mui-brushes.
  613.  
  614. (procedure installBrushes
  615.  
  616.     (set mui-dest "MUI:Images/")
  617.  
  618.     (set mui-help "a few MUI-Brushes for Dirlist-Objects...")
  619.  
  620.     (if (askbool
  621.             (prompt "\n\nInstall a few MUI-Brushes?")
  622.             (help   mui-help))
  623.  
  624.         (;then
  625.  
  626.             (set mui-dest
  627.                 (askdir
  628.                     (prompt  "Select destination path for 'RareDiamonds' brush-drawer.")
  629.                     (default mui-dest)
  630.                     (help    @askdir-help)
  631.                 )
  632.             )
  633.  
  634.             (message "\n\n Installing MUI-Brushes to\n\n"
  635.                      (tackon mui-dest "RareDiamonds"))
  636.  
  637.             (copyfiles
  638.                 (source  "mui/Images")
  639.                 (dest    mui-dest)
  640.                 (all)
  641.             )
  642.  
  643.     );end
  644.  
  645.     );fi
  646.  
  647. )
  648.  
  649.  
  650.  
  651. ;-----------------------------------------------------------------------------
  652. ; MAIN
  653.  
  654. (message (cat "\n\n The installation procedure may last a while, so don't "
  655.               "panic on heavy disk activity...\n\n"
  656.               "You should read at least the Installation part in the guide first,"
  657.               " especially if you want to install the icons in 4 colors!"))
  658.  
  659. (complete 0)
  660. (backupIcons)
  661. (complete 25)
  662. (installIcons)
  663. (complete 60)
  664. (installDrawers)
  665. (complete 65)
  666. (installDisks)
  667. (complete 70)
  668. (installArchive)
  669. (complete 85)
  670. (installToolbox)
  671. (complete 90)
  672. (installBackgrounds)
  673. (complete 95)
  674. ;(installBrushes)
  675. (complete 100)
  676.  
  677.  
  678. ;-----------------------------------------------------------------------------
  679.